package string;
/**
 * boolean startsWith(String s)
 * boolean endsWith(String s)
*/
public class StartsWithDemo {
    public static void main(String[] args) {
        String str="thinking in java";//java编程思想
        boolean starts=str.startsWith("think");//判断str是否以think开头
        System.out.println(starts);
        boolean ends=str.endsWith(".png");//判断str是否以.png结束
        System.out.println(ends);
        String str1="https:/123.com";
        boolean http=str1.startsWith("https:/");
        System.out.println(http);


    }
}
